/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package TanqueAgua;

/**
 *
 * @author nazaretruiz
 */
public class MangueraOUT extends Manguera{
    
    public MangueraOUT(){
        this.cantidad=0;
    }
    
    public MangueraOUT(TanqueAgua ta, int cantidad){
        this.ta=ta;
        this.cantidad=cantidad;
    }
    
    //Método para vaciar el tanque.
    @Override
    public int ejecutaAccion(){
         return ta.actualizaTanque(this.cantidad*-1);
    }
    
    public String toString(){
            return "Manguera OUT (-" + this.cantidad + ") : " ;
    }
    
    
}
